import 'package:flutter_test/flutter_test.dart';
import 'package:android_to_desktop/android_to_desktop.dart';
import 'package:android_to_desktop/android_to_desktop_platform_interface.dart';
import 'package:android_to_desktop/android_to_desktop_method_channel.dart';
import 'package:plugin_platform_interface/plugin_platform_interface.dart';

class MockAndroidToDesktopPlatform
    with MockPlatformInterfaceMixin
    implements AndroidToDesktopPlatform {
  @override
  Future<bool?> getPlatformVersion() => Future.value(true);
}

void main() {
  final AndroidToDesktopPlatform initialPlatform =
      AndroidToDesktopPlatform.instance;

  test('$MethodChannelAndroidToDesktop is the default instance', () {
    expect(initialPlatform, isInstanceOf<MethodChannelAndroidToDesktop>());
  });

  test('getPlatformVersion', () async {
    AndroidToDesktop androidToDesktopPlugin = AndroidToDesktop();
    MockAndroidToDesktopPlatform fakePlatform = MockAndroidToDesktopPlatform();
    AndroidToDesktopPlatform.instance = fakePlatform;
  });
}
